import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '优化产品',
    align:"center",
    dataIndex: 'productId_dictText',
    width:90
   },
   {
    title: '萃取次数1',
    align:"center",
    dataIndex: 'attempt1',
    width:90
   },
   {
    title: '萃取次数2',
    align:"center",
    dataIndex: 'attempt2',
    width:90

   },
   {
    title: '萃取次数3',
    align:"center",
    dataIndex: 'attempt3',
    width:90
   },
   {
    title: '萃取温度1(℃)',
    align:"center",
    dataIndex: 'temp1',
    width:110
   },
   {
    title: '萃取温度2(℃)',
    align:"center",
    dataIndex: 'temp2',
    width:110
   },
   {
    title: '萃取温度3(℃)',
    align:"center",
    dataIndex: 'temp3',
    width:110
    
   },
   {
    title: '萃取时间1(分)',
    align:"center",
    dataIndex: 'time1',
    width:110
   },
   {
    title: '萃取时间2(分)',
    align:"center",
    dataIndex: 'time2',
    width:110
   },
   {
    title: '萃取时间3(分)',
    align:"center",
    dataIndex: 'time3',
    width:110
   },
   {
    title: '料液比1',
    align:"center",
    dataIndex: 'ratio1',
    width:80
   },
   {
    title: '料液比2',
    align:"center",
    dataIndex: 'ratio2',
    width:80
   },
   {
    title: '料液比3',
    align:"center",
    dataIndex: 'ratio3',
    width:80
   },
   {
    title: '试验萃取率1(%)',
    align:"center",
    dataIndex: 'rate1',
    width:120
   },
   {
    title: '试验萃取率2(%)',
    align:"center",
    dataIndex: 'rate2',
    width:120
   },
   {
    title: '试验萃取率3(%)',
    align:"center",
    dataIndex: 'rate3',
    width:120
   },
   {
    title: '试验萃取率4(%)',
    align:"center",
    dataIndex: 'rate4',
    width:120
   },
   {
    title: '试验萃取率5(%)',
    align:"center",
    dataIndex: 'rate5',
    width:110
   },
   {
    title: '试验萃取率6(%)',
    align:"center",
    dataIndex: 'rate6',
    width:120
   },
   {
    title: '试验萃取率7(%)',
    align:"center",
    dataIndex: 'rate7',
    width:120
   },
   {
    title: '试验萃取率8(%)',
    align:"center",
    dataIndex: 'rate8',
    width:120
   },
   {
    title: '试验萃取率9(%)',
    align:"center",
    dataIndex: 'rate9',
    width:120
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
	{
      label: "优化产品",
      field: 'productId',
      component: 'JDictSelectTag',
      componentProps:{
          dictCode:"camellia_mes_product,name,id"
      },
      colProps: {span: 6},
 	},
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '优化产品',
    field: 'productId',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"camellia_mes_product,name,id"
     },
  },
  {
    label: '萃取次数1',
    field: 'attempt1',
    component: 'Input',
  },
  {
    label: '萃取次数2',
    field: 'attempt2',
    component: 'Input',
  },
  {
    label: '萃取次数3',
    field: 'attempt3',
    component: 'Input',
  },
  {
    label: '萃取温度1(℃)',
    field: 'temp1',
    component: 'Input',
  },
  {
    label: '萃取温度2(℃)',
    field: 'temp2',
    component: 'Input',
  },
  {
    label: '萃取温度3(℃)',
    field: 'temp3',
    component: 'Input',
  },
  {
    label: '萃取时间1(分)',
    field: 'time1',
    component: 'Input',
  },
  {
    label: '萃取时间2(分)',
    field: 'time2',
    component: 'Input',
  },
  {
    label: '萃取时间3(分)',
    field: 'time3',
    component: 'Input',
  },
  {
    label: '料液比1',
    field: 'ratio1',
    component: 'Input',
  },
  {
    label: '料液比2',
    field: 'ratio2',
    component: 'Input',
  },
  {
    label: '料液比3',
    field: 'ratio3',
    component: 'Input',
  },
  {
    label: '试验萃取率1(%)',
    field: 'rate1',
    component: 'InputNumber',
  },
  {
    label: '试验萃取率2(%)',
    field: 'rate2',
    component: 'InputNumber',
  },
  {
    label: '试验萃取率3(%)',
    field: 'rate3',
    component: 'InputNumber',
  },
  {
    label: '试验萃取率4(%)',
    field: 'rate4',
    component: 'InputNumber',
  },
  {
    label: '试验萃取率5(%)',
    field: 'rate5',
    component: 'InputNumber',
  },
  {
    label: '试验萃取率6(%)',
    field: 'rate6',
    component: 'InputNumber',
  },
  {
    label: '试验萃取率7(%)',
    field: 'rate7',
    component: 'InputNumber',
  },
  {
    label: '试验萃取率8(%)',
    field: 'rate8',
    component: 'InputNumber',
  },
  {
    label: '试验萃取率9(%)',
    field: 'rate9',
    component: 'InputNumber',
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];



/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}